package store.lunangangster.engine.impl.entity.mgr;

import java.util.List;
import store.lunangangster.engine.ProcessEngineConfiguration;
import store.lunangangster.engine.impl.entity.ResourceEntity;
import store.lunangangster.engine.impl.entity.ResourceEntityImpl;

public class ResourceEntityManagerImpl extends AbstractEntityManagerImpl<ResourceEntity> implements ResourceEntityManager {

  public ResourceEntityManagerImpl(
      ProcessEngineConfiguration processEngineConfiguration) {
    super(processEngineConfiguration);
  }

  @Override
  public Class<? extends ResourceEntity> getManagedEntityClass() {
    return ResourceEntityImpl.class;
  }

  @Override
  public ResourceEntity create() {
    return new ResourceEntityImpl();
  }

  @Override
  @SuppressWarnings("unchecked")
  public List<ResourceEntity> selectResourcesByDeploymentId(String deploymentId) {
    return selectList("selectResourcesByDeploymentId", deploymentId, null);
  }
}
